package com.ac.app.web.form;

import java.util.Date;
import java.util.List;

import com.caac.core.config.Config;
import com.caac.core.util.DateUtils;
import com.caac.core.web.form.BaseSearchForm;

/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright AgileCentury 2008</p>
 * <p>Company: AgileCentury </p>
 * @author <a href="mailto:ac@agilecentury.com">Agile</a>
 * @version 1.0
 */

public class PkUrlSearchForm extends BaseSearchForm {
	private String title;
	private String content;
	private Date pubDate1;
	private Date pubDate2;
	private String pubDate1String;
	private String pubDate2String;
	private String kwdCon;
	private String subName;
	private String srcName;
	private Date pickTime1;
	private Date pickTime2;
	private String pickTime1String;
	private String pickTime2String;
    private String curDate;
    private List subjects;

    public PkUrlSearchForm() {
        this.curDate = DateUtils.convertToString(new Date());
        subjects = Config.getInstance().getSubjects().getChildren();
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getPubDate1String() {
		return pubDate1String;
	}

	public void setPubDate1String(String pubDate1String) {
		this.pubDate1String = pubDate1String;
		try {
			this.pubDate1 = DateUtils.convertToDate("yyyy-MM-dd HH:mm:ss",
					pubDate1String + " 00:00:00");
		} catch (Exception e) {
			this.pubDate1 = null;
		}
	}

	public String getPubDate2String() {
		return pubDate2String;
	}

	public void setPubDate2String(String pubDate2String) {
		this.pubDate2String = pubDate2String;
		try {
			this.pubDate2 = DateUtils.convertToDate("yyyy-MM-dd HH:mm:ss",
					pubDate2String + " 23:59:59");
		} catch (Exception e) {
			this.pubDate2 = null;
		}
	}

	public String getPickTime1String() {
		return pickTime1String;
	}

	public void setPickTime1String(String pickTime1String) {
		this.pickTime1String = pickTime1String;
		try {
			this.pickTime1 = DateUtils.convertToDate("yyyy-MM-dd HH:mm:ss",
					pickTime1String + " 00:00:00");
		} catch (Exception e) {
			this.pickTime1 = null;
		}
	}

	public String getPickTime2String() {
		return pickTime2String;
	}

	public void setPickTime2String(String pickTime2String) {
		this.pickTime2String = pickTime2String;
		try {
			this.pickTime2 = DateUtils.convertToDate("yyyy-MM-dd HH:mm:ss",
					pickTime2String + " 23:59:59");
		} catch (Exception e) {
			this.pickTime2 = null;
		}
	}

	public String getKwdCon() {
		return kwdCon;
	}

	public void setKwdCon(String kwdCon) {
		this.kwdCon = kwdCon;
	}

	public String getSrcName() {
		return srcName;
	}

	public void setSrcName(String srcName) {
		this.srcName = srcName;
	}

	public String getSubName() {
		return subName;
	}

	public void setSubName(String subName) {
		this.subName = subName;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Date getPickTime1() {
		return pickTime1;
	}

	public void setPickTime1(Date pickTime1) {
		this.pickTime1 = pickTime1;
	}

	public Date getPickTime2() {
		return pickTime2;
	}

	public void setPickTime2(Date pickTime2) {
		this.pickTime2 = pickTime2;
	}

	public Date getPubDate1() {
		return pubDate1;
	}

	public void setPubDate1(Date pubDate1) {
		this.pubDate1 = pubDate1;
	}

	public Date getPubDate2() {
		return pubDate2;
	}

	public void setPubDate2(Date pubDate2) {
		this.pubDate2 = pubDate2;
	}

    public String getCurDate() {
        return curDate;
    }

    public void setCurDate(String curDate) {
        this.curDate = curDate;
    }

    public List getSubjects() {
        return subjects;
    }

    public void setSubjects(List subjects) {
        this.subjects = subjects;
    }
}
